const config = (_this) => {
  return {
    // 列表筛选
    formData: [
      {
        elType: "selectTree",
        id: "organisedUnitName",
        name: "organisedUnitId",
        label: "主办单位",
        attrs: {
          value: "",
          clearable: true,
          "collapse-tags": true
        },
        options: {
          attrs: {
            value: ""
          }
        },
        treeData: {
          attrs: {
            data: []
          },
          props: {
            children: "children",
            label: "orgName",
            value: "id"
          }
        }
      },
      {
        elType: "input",
        id: "drillProjectName",
        label: "演练项目",
        attrs: {
          size: "small",
          value: ""
        }
      },
      {
        elType: "select",
        id: "drillCategory",
        dic: "dic_ylsjlb",
        label: "演练事件类别",
        attrs: {
          value: "",
          clearable: true,
          filterable: true,
          "collapse-tags": true
        },
        options: []
      },
      {
        elType: "selectTree",
        id: "drillUnit",
        name: "drillUnitIds",
        label: "参演单位",
        attrs: {
          value: "",
          clearable: true,
          "collapse-tags": true
        },
        options: {
          attrs: {
            value: ""
          }
        },
        treeData: {
          attrs: {
            data: []
          },
          props: {
            children: "children",
            label: "orgName",
            value: "id"
          }
        }
      },
      {
        elType: "dateTimePicker",
        id: "planCompleteTime",
        label: "计划完成时间",
        attrs: {
          value: "",
          size: "small",
          type: "month",
          "value-format": "yyyy-MM"
        }
      },
      {
        elType: "select",
        id: "status",
        label: "状态",
        attrs: {
          value: "",
          size: "small",
          clearable: true,
          filterable: true,
          "collapse-tags": true
        },
        options: [
          {
            label: "已完成",
            value: 40
          },
          {
            label: "已报送",
            value: 50
          },
          {
            label: "已导入",
            value: 60
          }
        ]
      }
    ],
    // 列表表格
    table: {
      isSelectFlag: false,
      compRef: "yjrwlb",
      isSequenceFlag: true,
      isShowPage: true,
      resetFlag: true,
      loading: false,
      title: "年度演练计划列表",
      actions: [
        {
          id: "yearsImport",
          text: "导入",
          type: "primary",
          btnAttr: { size: "small" }
        }
        // {
        //   id: "add",
        //   text: "新增",
        //   btnAttr: { size: "small" }
        // }
      ],
      tableData: [],
      columns: [
        {
          prop: "drillProjectName",
          label: "演练项目",
          align: "left",
          "min-width": "220px",
          render: (h, { row }) => {
            return (<div>
              {/* style='color:#3561fd;cursor:pointer;text-decoration: underline;' */}
              {<span {...{
                on: {
                  click: () => {
                    // _this.toTaskDetail(row.id);
                  }
                }
              }}>
                {row.drillProjectName}
              </span>}
            </div>);
          }
        },
        {
          prop: "organisedUnitName",
          label: "主办单位",
          align: "center",
          "min-width": "180px"
        },
        {
          prop: "drillCategory",
          label: "演练事件类别",
          align: "center",
          "min-width": "180px"
        },
        {
          prop: "drillUnit",
          label: "参演单位",
          align: "left",
          "min-width": "320px"
        },
        {
          prop: "planCompleteTime",
          label: "计划完成时间",
          align: "center",
          "min-width": "180px"
        },
        {
          prop: "taskContent",
          label: "附件",
          align: "center",
          "min-width": "100px",
          render: (h, { row }) => {
            return (<div>
              {<span style='color:#3561fd;cursor:pointer;text-decoration: underline;' {...{
                on: {
                  click: () => {
                    _this.CheckFj(row);
                    // _this.$message({
                    //   message: "功能开发中",
                    //   type: "success"
                    // });
                  }
                }
              }}>
                {row.attachInfo1.length > 5 ? "查看" : ""}
              </span>}
            </div>);
          }
        },
        {
          prop: "statusName",
          label: "状态",
          align: "center",
          "min-width": "100px"
        }
      ],
      tableAttr: {
        "max-height": "430px",
        height: "430px",
        stripe: false,
        border: true,
        fit: true,
        "show-header": true,
        "highlight-current-row": true,
        "cell-style": {
          "font-size": "16px"
        },
        "header-cell-style": {
          "text-align": "center",
          "background-color": "#B1C8F9",
          border: "1px solid #ccc",
          color: "#333333",
          "font-size": "18px"
        }
      },
      // 分页信息
      paginationAtrrs: {
        total: 0,
        "background": true,
        layout: "prev, pager, next",
        "current-page": 1,
        "page-size": 10
      }
    },
    // 年度演练计划弹窗
    dialogConfig: {
      title: "年度演练计划",
      isShow: false,
      type: "",
      btnList: [
        {
          name: "提交",
          type: "primary",
          id: "yearImportSubmit",
          size: "mini"
        },
        {
          name: "取消",
          id: "cancel",
          size: "mini"
        }
      ]
    },
    // 折叠面板
    titleConfig: [
      {
        title: "年度演练信息",
        name: "1",
        slot: "slot1"
      },
      {
        title: "填报信息",
        name: "2",
        slot: "slot2"
      }
    ],
    activeNames: ["1", "2"],
    yearsImportConfig: {
      table: {
        isSelectFlag: false,
        compRef: "ndyljhlb",
        isSequenceFlag: true,
        isShowPage: false,
        resetFlag: true,
        autoHeight: true,
        loading: false,
        title: "",
        actions: [],
        tableData: [],
        columns: [
          {
            prop: "drillProjectName",
            label: "演练项目",
            align: "left",
            "min-width": "220px"
            // render: (h, { row }) => {
            //   return (<div>
            //     {<span style='color:#3561fd;cursor:pointer;text-decoration: underline;' {...{
            //       on: {
            //         click: () => {
            //           _this.toTaskDetail(row.id);
            //         }
            //       }
            //     }}>
            //       {row.drillProjectName}
            //     </span>}
            //   </div>);
            // }
          },
          {
            prop: "drillCategory",
            label: "演练事件类别",
            align: "center",
            "min-width": "180px"
          },
          {
            prop: "drillUnit",
            label: "参演单位",
            align: "left",
            "min-width": "300px"
          },
          {
            prop: "planCompleteTime",
            label: "计划完成时间",
            align: "center",
            "min-width": "180px"
          },
          {
            prop: "organisedUnitName",
            label: "主办单位",
            align: "center",
            "min-width": "180px"
          }
        ],
        tableAttr: {
          // "max-height": "430px",
          // height: "430px",
          stripe: false,
          border: true,
          fit: true,
          "show-header": true,
          "highlight-current-row": true,
          "cell-style": {
            "font-size": "16px"
          },
          "header-cell-style": {
            "text-align": "center",
            "background-color": "#B1C8F9",
            border: "1px solid #ccc",
            color: "#333333",
            "font-size": "18px"
          }
        },
        // 分页信息
        paginationAtrrs: {
          total: 0,
          "background": true,
          layout: "prev, pager, next",
          "current-page": 1,
          "page-size": 10
        }
      },
      formConfig: {
        formData: [
          {
            type: "upload",
            label: "年度演练计划",
            prop: "ztqks",
            slot: "upload",
            action: "#",
            accept: "*",
            class: "sjgy",
            customize: true,
            tip: "仅支持xls文件，且不超过50mb",
            limit: 1,
            lableWidth: "130px"
          }
        ]
      },
      formConfig1: {
        formData: [
          {
            type: "upload",
            label: "附件",
            prop: "ztqks",
            slot: "upload1",
            action: "#",
            accept: "*",
            class: "sjgy",
            customize: true,
            tip: "支持jpg/png/pdf/doc等文件，且不超过50mb",
            limit: 1,
            lableWidth: "130px"
          }
        ]
      },
      formConfig2: {
        formData: [
          {
            type: "input",
            label: "填报人",
            prop: "fillUser",
            class: "third",
            lableWidth: "140px",
            isDisabled: true
          },
          {
            type: "input",
            label: "单位及部门",
            prop: "fillUserDept",
            class: "third",
            lableWidth: "140px",
            isDisabled: true
          },
          {
            type: "dataPicker",
            label: "填报时间",
            prop: "fillTime",
            class: "third",
            lableWidth: "140px",
            dateType: "datetime",
            isDisabled: true
          }
        ]
      }
    }

  };
};
export default { config };
